﻿using System.Collections.Generic;
using System.Linq;
using SenileCoderMvc.Library.Models;

namespace SenileCoderMvc.Library.DataAccess
{
    public interface ISupportsDataAccess
    {
        List<string> GetObjects();

        IQueryable<T> Query<T>(IQueryObject<T> query)
            where T : IModel;

        T GetById<T>(object id)
            where T : IModel;

        void SaveOrUpdate<T>(T t)
            where T : IModel;

        void DeleteEntity<T>(T t)
            where T : IModel;
    }
}